package com.sdjzu.wangfuying.disableautobrightness.util;

import android.content.Context;

import java.io.File;
import java.util.Locale;

public class StorageUtil {
    public static File getExternalFilesDir(Context context) {
        File dataDirectory = context.getExternalFilesDir("");
        // ensure file dir existed
        if (null == dataDirectory) {
            dataDirectory = new File(String.format(Locale.getDefault(), "/storage/emulated/0/Android/data/%s/files", context.getPackageName()));
        }
        return dataDirectory;
    }
}
